<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    <head>
        <title>Module</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style type="text/css">
            #box{
                width: 1000px;
                text-align: center;
                margin: 0 auto;
                padding: 0;
            }
            #skip{
                text-decoration: none;
            }
            #body{
                width: 800px;
                margin: 0 auto;
            }
            .skip{
                text-decoration: none;
            }
            span{
                color: #bbb;
            }
            a{
                text-decoration:none;
            }
        </style>
    </head>
    <body>
        <div id="box">
            <h2>用户中心</h2>
            <h3>欢迎您，管理员。</h3>
            <h4 id="title"><a href="<?php echo U('Admin/Admin/center') ?>"><span>用户中心</span></a>&nbsp;&nbsp;<a href="<?php echo U('Admin/Admin/feedback') ?>"><span>用户反馈</span></a>&nbsp;&nbsp;<a href="<?php echo U('Admin/Admin/module') ?>"><span>模块管理</span></a></h4>
            <br/>
            <a href="<?php echo U('Home/Home/home')?>">返回首页</a>&nbsp;&nbsp;<a id="skip" href="<?php echo U('Admin/Admin/back') ?>">退出</a>
            <br/><br/>
            <table id="body">
                <tr>
                    <th>模块ID</th>
                    <th>发布者</th>
                    <th>模块名</th>
                    <th>模块分类</th>
                    <th>Drupal版本</th>
                    <th>发布时间</th>
                    <th>审核状态</th>
                    <th>管理</th>
                </tr>
                <?php foreach($lists as $k=>$v) { ?>
                <tr>
                    <td>
                        <?php echo $v['id']?>
                    </td>
                    <td>
                        <?php echo $v['name']?>
                    </td>
                    <td>
                        <?php echo $v['title']?>
                    </td>
                    <td>
                        <?php if($v['module_class'] == 1){ echo 'html5'; }else if($v['module_class'] == 2){ echo 'jQuery'; }else if($v['module_class'] == 3){ echo 'views'; }else if($v['module_class'] == 4){ echo '主题/Theme'; }else if($v['module_class'] == 5){ echo '其他'; }?>
                    </td>
                    <td>
                        <?php if($v['drupal_version']==1){echo 'Drupal 6';}elseif($v['drupal_version']==2){echo 'Drupal 7';}elseif($v['drupal_version']==3){echo 'Drupal 8';} ?>
                    </td>
                    <td>
                        <?php echo date('Y-m-d H:i:s',$value['create_time'])?>
                    </td>
                    <td>
                        <?php if($v['status']==0){echo '未审核';}else{echo '已审核';} ?>
                    </td>
                    <td>
                        <a class="skip" href="<?php echo U('Admin/moduleread?id='.$v['id']) ?>">编辑</a>
                    </td>
                </tr>
                <?php } ?>
            </table>
        </div>
    </body>
</html>